Inserting
an OLE 2 Object in an OLE 1 Application
If a particular
class is insertable in an OLE 1 container, the ProgID root key will
contain a Protocol\StdFileEditing subkey with appropriate subkeys Verb, Server, and so on, as
in OLE 1. The Server that should be registered here is the full path to the executable file
of the OLE 2 object application. An OLE 1 container uses the path and
executable file names to launch the OLE 2 object application. The initialization
of this application, in turn, loads the OLE 2 compatibility layer. This layer
handles subsequent interactions with the OLE 1 container (client), turning them
into OLE 2-like requests to the OLE 2
application. An OLE 2 object application doesn t have to take any special
action beyond setting up these registry entries to make objects insertable into
an OLE 1 container.
The ProgID
key and its subkeys appear in the registry as shown in the following example,
where <Progid> is the
key, and Insertable, Protocol, StdFileEditing, Verb, and so on are subkeys.
<ProgId>
= <MainUserTypeName>
Insertable // class is insertable in OLE 2 containers
Protocol
StdFileEditing // OLE 1 compatibility info; present if,
and only if,
// objects
of this class are insertable in OLE 1 containers.
Server = <full path
to the OLE 2 object application>
Verb
0 = <verb 0> // Verb entries for the OLE 2 application
must start with zero as the
1 = <verb 1> // primary verb and run consecutively.
CLSID = <CLSID> //
The corresponding CLSID. Needed by GetClassFile.
Shell // Windows 3.1 File
Manager Info
Print
Open
Command = <appname.exe>
%1
To summarize,
any root key that has either an Insertable or a Protocol\StdFileEditing subkey is
the ProgID (or OLE 1 class name) of a class that should appear in the Insert
Object dialog box. The value of that root key is the name displayed in the
Insert Object dialog box.
The values of
each key in the example below are used for registering the Ole 2 In-Place
Server Outline sample application. Set these values as required and used by
your application.